flag = False
# flag = True
if flag:
    from naie.datasets import get_data_reference
    import moxing as mox

    data_ref = get_data_reference(dataset='DatasetService', dataset_entity='mycode')
    file_paths = data_ref.get_files_paths()[0]
    mox.file.copy(file_paths, './cache/'+file_paths.split('/')[-1])

# ===========================================================================================
flag = False
# flag = True
if flag:
    import zipfile
    zip_file = zipfile.ZipFile('./cache/mycode.zip')
    zip_list = zip_file.namelist()
    for f in zip_list:
        zip_file.extract(f, './cache/')

# ===========================================================================================
flag = False
# flag = True
if flag:
    import moxing as mox
    mox.file.copy_parallel('./cache/mycode', './')
